<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>BoboCMS后台管理 - <?php echo ($title); ?></title>
		<!--                       CSS                       -->
		<!-- Reset Stylesheet -->
		<link rel="stylesheet" href="__APP__/resources/css/console/reset.css" type="text/css" media="screen" />
		<!-- Main Stylesheet -->
		<link rel="stylesheet" href="__APP__/resources/css/console/style.css" type="text/css" media="screen" />
		
		<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
		<link rel="stylesheet" href="__APP__/resources/console/css/invalid.css" type="text/css" media="screen" />	
		
		<!-- Colour Schemes
	  
		Default colour scheme is green. Uncomment prefered stylesheet to use it.
		
		<link rel="stylesheet" href="resources/css/blue.css" type="text/css" media="screen" />
		
		<link rel="stylesheet" href="resources/css/red.css" type="text/css" media="screen" />  
	 
		-->
		
		<!-- Internet Explorer Fixes Stylesheet -->
		
		<!--[if lte IE 7]>
			<link rel="stylesheet" href="resources/css/ie.css" type="text/css" media="screen" />
		<![endif]-->
		
		<!--                       Javascripts                       -->
  
		<!-- jQuery -->
		<script type="text/javascript" src="__APP__/resources/js/jquery-1.5.1.js"></script>
		
		<!-- jQuery Configuration -->
		<script type="text/javascript" src="__APP__/resources/js/simpla.jquery.configuration.js"></script>
                <script type="text/javascript" src="__APP__/resources/js/artDialog.min.js"></script>		
		<!-- Facebox jQuery Plugin -->
		<script type="text/javascript" src="__APP__/resources/js/facebox.js"></script>
		<?php if(ACTION_NAME == 'articleadd' || ACTION_NAME == 'articleedit'){ ?>
                <script type="text/javascript" src="__APP__/resources/js/xheditor-1.1.6-zh-cn.min.js"></script>
                <script type="text/javascript" src="__APP__/resources/js/xheditor_plugins/ubb.min.js"></script>
                <?php } ?>
		<!-- Internet Explorer .png-fix -->
		
		<!--[if IE 6]>
			<script type="text/javascript" src="__APP__/resources/js/DD_belatedPNG_0.0.8a-min.js"></script>
			<script type="text/javascript">
				DD_belatedPNG.fix('.png_bg, img, li');
			</script>
		<![endif]-->
		
	</head>
  
	<body><div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
		
		<div id="sidebar"><div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->
			
			<h1 id="sidebar-title"><a href="#">BoboCMS后台管理</a></h1>
		  
			<!-- Logo (221px wide) -->
			<a href="#"><img id="logo" src="__APP__/resources/image/console/logo.png" alt="Simpla Admin logo" /></a>
		  
			<!-- Sidebar Profile links -->
			<div id="profile-links">
				Hello, <a href="#" title="Edit your profile"><?php echo ($user["username"]); ?></a><!--, you have <a href="#messages" rel="modal" title="3 Messages">3 Messages</a><br />-->
				<br />
				<a href="<?php echo U('Home-main/index');?>" title="查看前台首页">查看前台首页</a> | <a href="#" title="查看前台首页">修改密码</a> | <a href="<?php echo U('member/logout');?>" title="$this->checkConsoleLogin() && $this->redirect('main/index');登出">登出</a>
			</div>        
			
			<ul id="main-nav">  <!-- Accordion Menu -->
                <?php if(is_array($menu)): $i = 0; $__LIST__ = $menu;$_count = count($__LIST__);if( $_count==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><li>
					<a href="<?php echo ($vo["url"]); ?>" class="nav-top-item <?php echo ($currTopNav["$key"]); ?> <?php if (empty($vo['sub_menu'])) echo 'no-submenu'; ?>"> <!-- Add the class "no-submenu" to menu items with no sub menu -->
						<?php echo ($vo["title"]); ?>
					</a>
                    <?php if ($vo['sub_menu']){
                        echo '<ul>';
                        foreach($vo['sub_menu'] as $value){
                            echo '<li><a href="'.$value['url'].'" title="'.$value['title'].'" class="'.$currSubNav[$value['ma']].'" >'.$value['title'].'</a></li>';
                        }
                        echo '</ul>';
                    } ?>
				</li><?php endforeach; endif; else: echo "" ;endif; ?>
			</ul> <!-- End #main-nav -->
		
		</div></div> <!-- End #sidebar -->
		<div id="main-content"> <!-- Main Content Section with everything -->
			
			<noscript> <!-- Show a notification if the user has disabled javascript -->
				<div class="notification error png_bg">
					<div>
						Javascript is disabled or is not supported by your browser. Please <a href="http://browsehappy.com/" title="Upgrade to a better browser">upgrade</a> your browser or <a href="http://www.google.com/support/bin/answer.py?answer=23852" title="Enable Javascript in your browser">enable</a> Javascript to navigate the interface properly.
					Download From <a href="http://www.exet.tk">exet.tk</a></div>
				</div>
			</noscript>
			
			<!-- Page Head -->
			<h2>Welcome <?php echo ($user["username"]); ?></h2>
			<p id="page-intro">What would you like to do?</p>
			<ul class="shortcut-buttons-set">
				
				<li><a class="shortcut-button" href="<?php echo U('main/cateAdd');?>"><span>
					<img src="__APP__/resources/image/console/icons/pencil_48.png" alt="icon" /><br />
					添加分类
				</span></a></li>
				
				<li><a class="shortcut-button" href="<?php echo U('main/articleAdd');?>"><span>
					<img src="__APP__/resources/image/console/icons/paper_content_pencil_48.png" alt="icon" /><br />
					添加文章
				</span></a></li>
				
				<li><a class="shortcut-button" href="<?php echo U('ad/adAdd');?>"><span>
					<img src="__APP__/resources/image/console/icons/image_add_48.png" alt="icon" /><br />
					添加广告
				</span></a></li>
				
				<li><a class="shortcut-button" href="#"><span>
					<img src="__APP__/resources/image/console/icons/clock_48.png" alt="icon" /><br />
					Add an Event
				</span></a></li>
				
				<li><a class="shortcut-button" href="#messages" rel="modal"><span>
					<img src="__APP__/resources/image/console/icons/comment_48.png" alt="icon" /><br />
					Open Modal
				</span></a></li>
				
			</ul><!-- End .shortcut-buttons-set -->
			<div class="clear"></div> <!-- End .clear -->
			<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>添加文章</h3>
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
                    <div class="tab-content" id="tab2">
					
						<form action="<?php echo U('main/articleAddPost');?>" method="post">
							
							<fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
								<p>
									<label><span class="c1">*</span>选择分类：</label>              
									<select name="cate" class="small-input">
										<option value="0">请选择分类</option>
                                                                                <?php if(is_array($cate)): $i = 0; $__LIST__ = $cate;$_count = count($__LIST__);if( $_count==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo $vo['cid'].','.$vo['cname'] ?>"><?php echo ($vo["cname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
									</select> 
								</p>
                                                                 <p>
									<label><span class="c1">*</span>标题：</label>
										<input class="text-input large-input" type="text" id="title" name="title" />
										<br /><small>80字以内</small>
								</p>
                                <p>
									<label>来源：</label>
										<input class="text-input large-input" type="text" id="title" name="author" />
										<br /><small>如果想加入文章来源并且链接，请输入类似"腾讯,http://www.qq.com"字样。</small>
								</p>                                
								<p>
									<label>链接：</label>
									<input class="text-input medium-input datepicker" type="text" id="keywords" name="keywords" />
                                                                        <br /><small>填写的URL后将不显示内容,直接跳转至链接地址。</small>
								</p>						
								<p>
									<label>关键字：</label>
									<input class="text-input medium-input datepicker" type="text" id="keywords" name="keywords" />
                                                                        <br /><small>多关键字请使用“,”号隔开</small>
								</p>
								<p>
									<label>摘要：</label>
									<textarea class="text-input textarea" id="abstract" name="abstract" cols="79" rows="4"></textarea>
                                    <br /><small>255字以内</small>
								</p>
								<p>
									<label>内容：</label>
									<textarea class="text-input textarea" id="content" name="content" cols="79" rows="15"></textarea>
								</p>								
							
								<p>
									<label>是否显示：</label>
									<input type="radio" name="is_display" value="1" checked="checked" />显示 
									<input type="radio" name="is_display" value="2" />发布但不显示
								</p>
								<p>
									<input class="button" type="submit" value="提交" />
								</p>
								
							</fieldset>
							
							<div class="clear"></div><!-- End .clear -->
							
						</form>
						
					</div> <!-- End #tab2 --> 					
				</div> <!-- End .content-box-content -->
			</div> <!-- End .content-box -->

			<div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
						&#169; Copyright 2011 搜我 | Powered by <a href="<?php echo U('Home-main/index');?>">搜我</a> | <a href="#">Top</a>
				</small>
			</div><!-- End #footer -->
			
		</div> <!-- End #main-content -->
		
	</div></body>
  

<!-- Download From www.exet.tk-->
</html>
<script type="text/javascript">
$(function(){
    var plugins={
        Code:{c:'btnCode',t:'插入代码',h:1,e:function(){
                var _this=this;
                var htmlCode='<div><select id="xheCodeType"><option value="html">HTML/XML</option><option value="js">Javascript</option><option value="css">CSS</option><option value="php">PHP</option><option value="java">Java</option><option value="py">Python</option><option value="pl">Perl</option><option value="rb">Ruby</option><option value="cs">C#</option><option value="c">C++/C</option><option value="vb">VB/ASP</option><option value="">其它</option></select></div><div><textarea id="xheCodeValue" wrap="soft" spellcheck="false" style="width:300px;height:100px;" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="确定" /></div>';			var jCode=$(htmlCode),jType=$('#xheCodeType',jCode),jValue=$('#xheCodeValue',jCode),jSave=$('#xheSave',jCode);
                jSave.click(function(){
                        _this.loadBookmark();
                        _this.pasteText('[code='+jType.val()+']rn'+jValue.val()+'rn[/code]');
                        _this.hidePanel();
                        return false;});
                _this.showDialog(jCode);
        }},
        Flv:{c:'btnFlv',t:'插入Flv视频',h:1,e:function(){
                var _this=this;
                var htmlFlv='<div>Flv文件:&nbsp; <input type="text" id="xheFlvUrl" value="http://" class="xheText" /></div><div>宽度高度: <input type="text" id="xheFlvWidth" style="width:40px;" value="480" /> x <input type="text" id="xheFlvHeight" style="width:40px;" value="400" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="确定" /></div>';
                var jFlv=$(htmlFlv),jUrl=$('#xheFlvUrl',jFlv),jWidth=$('#xheFlvWidth',jFlv),jHeight=$('#xheFlvHeight',jFlv),jSave=$('#xheSave',jFlv);
                jSave.click(function(){
                        _this.loadBookmark();
                        _this.pasteText('[flv='+jWidth.val()+','+jHeight.val()+']'+jUrl.val()+'[/flv]');
                        _this.hidePanel();
                        return false;});
                _this.showDialog(jFlv);
        }},
        map:{c:'btnMap',t:'插入Google地图',e:function(){
                var _this=this;
                _this.showIframeModal('Google 地图','googlemap/googlemap.html',function(v){_this.pasteHTML('<img src="'+v+'" />');},538,404);
        }}
    },emots={
        msn:{name:'MSN',count:40,width:22,height:22,line:8},
        pidgin:{name:'Pidgin',width:22,height:25,line:8,list:{smile:'微笑',cute:'可爱',wink:'眨眼',laugh:'大笑',victory:'胜利',sad:'伤心',cry:'哭泣',angry:'生气',shout:'大骂',curse:'诅咒',devil:'魔鬼',blush:'害羞',tongue:'吐舌头',envy:'羡慕',cool:'耍酷',kiss:'吻',shocked:'惊讶',sweat:'汗',sick:'生病',bye:'再见',tired:'累',sleepy:'睡了',question:'疑问',rose:'玫瑰',gift:'礼物',coffee:'咖啡',music:'音乐',soccer:'足球',good:'赞同',bad:'反对',love:'心',brokenheart:'伤心'}},
        ipb:{name:'IPB',width:20,height:25,line:8,list:{smile:'微笑',joyful:'开心',laugh:'笑',biglaugh:'大笑',w00t:'欢呼',wub:'欢喜',depres:'沮丧',sad:'悲伤',cry:'哭泣',angry:'生气',devil:'魔鬼',blush:'脸红',kiss:'吻',surprised:'惊讶',wondering:'疑惑',unsure:'不确定',tongue:'吐舌头',cool:'耍酷',blink:'眨眼',whistling:'吹口哨',glare:'轻视',pinch:'捏',sideways:'侧身',sleep:'睡了',sick:'生病',ninja:'忍者',bandit:'强盗',police:'警察',angel:'天使',magician:'魔法师',alien:'外星人',heart:'心动'}}
    }; 
    $('#content').xheditor({
        plugins:plugins,
        tools:'full',
        showBlocktag:false,
        forcePtag:false,
        beforeSetSource:ubb2html,
        beforeGetSource:html2ubb,
        emots:emots,
        emotMark:true,
        html5Upload:false,
        upLinkUrl:"<?php echo U('main/upload');?>",
        upLinkExt:"zip,rar,txt",
        upImgUrl:"<?php echo U('main/upload');?>",
        upImgExt:"jpg,jpeg,gif,png,bmp",
        upFlashUrl:"<?php echo U('main/upload');?>",
        upFlashExt:"swf",
        upMediaUrl:"<?php echo U('main/upload');?>",
        upMediaExt:"avi"});
    $('#abstract').xheditor({
        tools:'simple',
        beforeSetSource:ubb2html,
        beforeGetSource:html2ubb
    })
})
</script>